// http://localhost:8080/api/
// https://www.live-stock.org
const ipAddress = ''
export const url = ''
// const ipAddress = 'https://investingclever.com'
// export const url = 'https://investingclever.com'
// const ipAddress = 'http://192.168.31.6:8089'
import api from './http'

// 登录
export const loginApi = (params) => api.post(ipAddress + '/admin/Administrators/login', params) // 登录
export const logOutAndLogIn = () => api.get(ipAddress + '/admin/Administrators/logOut') // 退出登录
// export const obtainVerificationCode = (params) => api.post(ipAddress + '/admin/AdminUser/captcha', params) // 验证码


// 上传图片

export const uploadImage = (params) => api.post(ipAddress + '/admin/System/imgUpload', params) // 上传图片

// 菜单
export const menuBar = (params) => api.post(ipAddress + '/admin/Menu/list', params) // 菜单列表
export const menuList2 = (params) => api.post(ipAddress + '/admin/index/index/', params) // 菜单列表2
export const menuEditing = (params) => api.post(ipAddress + '/admin/AdminMenu/upd', params) // 菜单编辑

// 栏目内容
export const columnContentList = (params) => api.post(ipAddress + '/admin/CategoryContent/list', params) // 栏目内容列表
export const newColumnContentAdded = (params) => api.post(ipAddress + '/admin/CategoryContent/add', params) // 栏目内容新增
export const columnContentEditing = (params, id) => api.post(ipAddress + `/admin/CategoryContent/edit/${id}`, params) // 栏目内容编辑
export const deleteColumnContent = (params) => api.get(ipAddress + `/admin/CategoryContent/delete/${params}`,) // 栏目内容删除
export const singleColumnContent = (params, id) => api.get(ipAddress + `/admin/CategoryContent/get/${id}`, params) // 单个栏目内容

// 研究报告
export const listOfResearchReports = (params) => api.post(ipAddress + '/admin/ResearchReport/list', params) // 研究报告列表
export const newResearchReportAdded = (params) => api.post(ipAddress + '/admin/ResearchReport/add', params) // 研究报告新增
export const researchReportEditor = (params, id) => api.post(ipAddress + `/admin/ResearchReport/edit/${id}`, params) // 研究报告编辑
export const deleteResearchReport = (params) => api.get(ipAddress + `/admin/ResearchReport/delete/${params}`) // 研究报告删除
export const individualResearchReport = (params, id) => api.get(ipAddress + `/admin/CategoryContent/get/${id}`, params) // 单个研究报告

// 服务
export const obtainServiceContent = (params) => api.post(ipAddress + '/admin/Expertise/list', params) // 获取服务内容
export const updateServiceContent = (params) => api.post(ipAddress + '/admin/Expertise/upd', params) // 更新服务内容

// 课程
export const courseList = (params) => api.post(ipAddress + '/admin/Course/list', params) // 课程列表
export const courseAddition = (params) => api.post(ipAddress + '/admin/Course/add', params) // 课程新增
export const courseEditor = (params, id) => api.post(ipAddress + `/admin/Course/edit/${id}`, params) // 课程编辑
export const courseDeletion = (id) => api.get(ipAddress + `/admin/Course/delete/${id}`) // 课程删除

// 首页系统html
export const homepageSystemHtmlList = (params) => api.post(ipAddress + '/admin/System/getIndexHtml', params) // 首页系统html列表
export const homeSystemHtmlAdded = (params) => api.post(ipAddress + '/admin/System/addIndexHtml', params) // 首页系统html新增
export const homeSystemHtmlEditing = (params, id) => api.post(ipAddress + `/admin/System/editIndexHtml/${id}`, params) // 首页系统html编辑
export const homepageSystemHtmlDeletion = (id) => api.get(ipAddress + `/admin/System/deleteIndexHtml/${id}`) // 首页系统html删除

// 订阅
export const getSubscriptionList = (params) => api.post(ipAddress + '/admin/Subscriptions/list', params) // 获取订阅列表
export const addSubscription = (params) => api.post(ipAddress + '/admin/Subscriptions/add', params) // 添加订阅



// 栏目
export const columnList = (params) => api.post(ipAddress + '/admin/Category/list', params) // 栏目列表
export const columnAddition = (params) => api.post(ipAddress + '/admin/Category/add', params) // 栏目添加
export const topicalEditor = (params, id) => api.post(ipAddress + `/admin/Category/edit/${id}`, params) // 栏目编辑
export const columnDeletion = (id) => api.get(ipAddress + `/admin/Category/delete/${id}`) // 栏目删除

// 股票
export const stockList = (params) => api.post(ipAddress + '/admin/Stocks/list', params) // 股票列表
export const stockAddition = (params) => api.post(ipAddress + '/admin/Stocks/add', params) // 股票添加
export const stockEditor = (params, id) => api.post(ipAddress + `/admin/Stocks/edit/${id}`, params) // 股票编辑
export const stockDeletion = (params) => api.post(ipAddress + '/admin/Stocks/delete', params) // 股票删除

// 调整查看
export const adjustTheViewingList = (params) => api.post(ipAddress + '/admin/RecentAdjustment/list', params) // 调整查看列表
export const adjustViewAdd = (params) => api.post(ipAddress + '/admin/RecentAdjustment/add', params) // 调整查看添加
export const adjustViewEdit = (params, id) => api.post(ipAddress + `/admin/RecentAdjustment/edit/${id}`, params) // 调整查看编辑
export const adjustViewDelete = (id) => api.get(ipAddress + `/admin/RecentAdjustment/delete/${id}`) // 调整查看删除


// 管理员
export const managers = (params) => api.post(ipAddress + '/admin/Administrators/list/page', params) // 管理员列表
export const administratorAdded = (params) => api.post(ipAddress + '/admin/Administrators/add', params) // 管理员添加
export const administratorEditor = (params, id) => api.post(ipAddress + `/admin/Administrators/edit/${id}`, params) // 管理员编辑
export const administratorDelete = (id) => api.get(ipAddress + `/admin/Administrators/delete/${id}`) // 管理员删除

// 用户
export const userList = (params) => api.post(ipAddress + '/admin/Users/list', params) // 用户列表
export const userAddition = (params) => api.post(ipAddress + '/admin/Users/add', params) // 用户添加
export const userEditing = (params) => api.post(ipAddress + '/admin/Users/edit', params) // 用户编辑
export const userDeletion = (params) => api.delete(ipAddress + '/admin/Users/delete', params) // 用户删除


// 老师
export const teacherList = () => api.get(ipAddress + `/admin/Teachers/get`) // 老师列表
export const teacherAdded = (params) => api.post(ipAddress + '/admin/Teachers/add', params) // 老师添加
export const teacherEditor = (params) => api.post(ipAddress + `/admin/Teachers/edit`, params) // 老师编辑
export const teacherDelete = (id) => api.delete(ipAddress + `/admin/Teachers/delete/${id}`) // 老师删除

// 订阅服务
export const subscriptionServiceList = (params) => api.post(ipAddress + '/admin/SubscriptionServices/list/page', params) // 订阅服务列表
export const addSubscriptionService = (params) => api.post(ipAddress + '/admin/SubscriptionServices/add', params) // 订阅服务添加
export const subscriptionServiceEditor = (params, id) => api.post(ipAddress + `/admin/SubscriptionServices/edit/${id}`, params) // 订阅服务编辑
export const subscriptionServiceDeletion = (params) => api.post(ipAddress + '/admin/SubscriptionServices/delete', params) // 订阅服务删除

// 语言
export const languageFunction = (params) => api.post(ipAddress + '/admin/Language/list', params) // 语言功能
export const languageFunctionModification = (params) => api.post(ipAddress + '/admin/Language/edit', params) // 语言功能修改


export const industryContent = (params) => api.get(ipAddress + `/admin/Category/list/`, params) // 行业内容

//设置
export const numberOfSystemEntries = (params) => api.post(ipAddress + `/admin/System/setNum`, params) // 系统条目数量

export const setMultilingualOnOff = (params) => api.post(ipAddress + `/admin/System/multilingualOnOff`, params) // 多语言开关
export const getEntry = () => api.get(ipAddress + `/admin/System/getNum`) // 获取条目
export const updateCache = () => api.get(ipAddress + `/admin/System/updIndexCache`) // 更新缓存
export const contactInformation = (params) => api.post(ipAddress + `/index/Index/getConfig`, params) // 联系方式
export const getLanguageList = (params) => api.post(ipAddress + `/admin/System/getAllLanguage`, params) // 获取语言列表
export const editLanguage = (params) => api.post(ipAddress + `/admin/System/editAllLanguage`, params) // 编辑语言
export const setDefaultLanguage = (params) => api.post(ipAddress + `/admin/System/setDefaultLanguage`, params) // 设置默认语言



// 爬取股票信息
export const crawlStockInformation = (page) => api.get(ipAddress + `/admin/CrawlingStocksMsg/list/${page}`) // 爬取股票信息
export const editCrawlingStocks = (params) => api.post(ipAddress + `/admin/CrawlingStocksMsg/edit/${params.id}`, { is_public: params.is_public }) // 编辑爬取股票

export const crawlerRecords = (page) => api.get(ipAddress + `/admin/CrawlerInformationRecord/list/${page}`) // 爬虫记录
export const PayInfo = (params, page) => api.post(ipAddress + `/admin/PayInfo/list/${page}`, params) // 支付信息
export const order = (params) => api.post(ipAddress + '/admin/Orders/list', params)// 订单
export const SmsVerificationCode = (params) => api.post(ipAddress + '/admin/SmsVerificationCode/list', params)// 验证码列表
export const logsList = (params) => api.post(ipAddress + '/admin/Logs/list', params)// 日志列表

export const urlsc = '/admin/System/imgUpload'
export const urlxs = '/admin/System/imgUpload'
export const urlip = ''



